<template>
    <div>
        <input type="text" v-model.number="inputNumber">
        <button @click="subNumber">-</button>
    </div>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  data () {
    return {
      inputNumber: 0
    }
  },
  methods: {
    ...mapMutations(['sub']),
    subNumber () {
      this.sub(this.inputNumber)
    }
  }
}
</script>
